package com.fowo.api.model.purchase.constant;

/**
 * 采购订单审批状态字符串枚举
 */
public class PurchaseOrderAStatusEnums {

  /** 所有可用值 */
  public static final String[] Values = new String[] {
    "-1",
    "0",
    "1",
    "2",
    "9",
    "121",
    "122",
    "124",
  };
  /** 所有可用标题 */
  public static final String[] Labels = new String[] {
    "作废",
    "待提交",
    "待下单",
    "待到货",
    "完成",
    "待审核(审批流)",
    "驳回(审批流)",
    "作废(审批流)",
  };

  /** 枚举值转换为标题 */
  public static String toLabel(String value) {
    for (int i = 0; i < Values.length; i++) {
      if (Values[i].equals(value)) {
        return Labels[i];
      }
    }
    return null;
  }

  /** 标题转换为枚举值 */
  public static String toValue(String label) {
    for (int i = 0; i < Labels.length; i++) {
      if (Labels[i].equals(label)) {
        return Values[i];
      }
    }
    return null;
  }
}
